const { resolve, isMp } = require("./shared");
const cssMacro = require("weapp-tailwindcss/css-macro");
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./index.html",
    "pages/**/*.{vue,ts,js,wxml}",
    "goods_packages/**/*.{vue,ts,js,wxml}",
    "components/*.{vue,ts,js,wxml}",
  ].map(resolve),
  theme: {
    extend: {
      colors: {
        primary: "#ff0000",
        second: "#00ff00",
        black: "#190808",
      },
      fontFamily: {
        heiti: ["heiti"],
      },
    },
  },
  plugins: [
    // https://weapp-tw.icebreaker.top/docs/quick-start/uni-app-css-macro
    cssMacro({
      variantsMap: {
        wx: "MP-WEIXIN",
        "-wx": {
          value: "MP-WEIXIN",
          negative: true,
        },
      },
    }),
  ],
  corePlugins: {
    preflight: !isMp,
  },
};
